import React from 'react';
import { Row, Col } from 'antd';

import styles from '../style.less';
import { DATA_DISPLAY } from '../data';

export default function DataDisplay(props: any) {
  const { basic } = props;
  const data = DATA_DISPLAY.map(item => {
    item.value = basic[item.key] || [1, 2];
    return item;
  });

  return (
    <Row>
      <Col span={3} className={styles.dataItem} style={{ paddingTop: '35px' }}>
        <p>今日</p>
        <p>昨天</p>
      </Col>
      {data.map(item => (
        <Col span={3} className={styles.dataItem}>
          <p>今日</p>
          <p>昨天</p>
        </Col>
      ))}
    </Row>
  );
}
